<%@ page language="java" pageEncoding="UTF-8"%>

<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html"%>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic"%>
<%@ taglib uri="http://struts.apache.org/tags-tiles" prefix="tiles"%>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html:html lang="true">
<head>
	<html:base />

	<title>userGrant.jsp</title>
	<link href="./css/xtab.css" rel="stylesheet" type="text/css" />
</head>

<body><br>
	<html:form action="/user.do?method=userGrant">
		<table cellspacing="0" width="100%" border="1">

			<tr>
				<td class="tableTitle" width="10%"> 
					角色名称 
				<br></td>
				<td width="40%">
					${user.userName }
				</td>
				<td class="tableTitle" width="10%">
					邮箱地址
				</td>
				<td width="40%">
					${user.email }
				</td>
			</tr>
		</table>
		<br>
		<table align="center" width="100%" cellspacing="0">
			<tr>
				<th class="tableTitle">
					角色
				</th>
				<th class="tableTitle">
					维度
				</th>
			</tr>
			<tr>
				<td class="tableElement">
				   <html:hidden property="user.userId"></html:hidden>
					<html:select property="user.roleId">
					   <html:option value="">--</html:option>
					   <html:options collection="listRole" property="id" labelProperty="displayName"/>
					 </html:select>
					 
				</td>
				<td class="tableElement">
					<html:select property="user.programId">
					   <html:option value="">--</html:option>
					   <html:options collection="listProgram" property="id" labelProperty="displayName"/>
					 </html:select>
				</td>
			</tr>
			<tr>
				<td colspan="2" align="center">
				  	<input type="button" class="button" value="保存" id="create">
				</td>
			</tr>
		</table>
	</html:form>
	<script>
		$("#create").click(function(){
			var f=document.forms[0];
			f.action="user.do?method=userGrant";
			f.submit();
		}); 
	</script>
</body>
</html:html>
